Socket
Socket
Sign inDemoInstall

unixify

Package Overview
Dependencies
1
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

unixify

Convert Windows file paths to unix paths.


Version published
Weekly downloads
3.5M
increased by13.44%
Maintainers
2
Install size
20.7 kB
Created
Weekly downloads
 

Package description

What is unixify?

The unixify npm package is a utility that converts Windows-style file paths to Unix-style file paths. It is a simple and lightweight package that can be used to ensure file paths are compatible with Unix-based systems, which is particularly useful when working with tools or codebases that are expected to run across different operating systems.

What are unixify's main functionalities?

Convert Windows paths to Unix paths

This feature allows you to convert a Windows file path to a Unix file path by replacing backslashes with forward slashes and removing any drive letters.

const unixify = require('unixify');
const unixPath = unixify('C:\\Users\\Example\\file.txt');
console.log(unixPath); // Output: '/Users/Example/file.txt'

Other packages similar to unixify

Readme

Source

unixify NPM version

Convert Windows file paths to unix paths.

Install with npm

$ npm i unixify --save

Usage

var unixify = require('unixify');

unixify('one\\two\\three');
//=> 'one/two/three'

unixify('one\\two\\//three');
//=> 'one/two/three'

unixify('C:\\one\\two\\three');
//=> '/one/two/three'

unixify('C:\\//one\\//two\\//three');
//=> '/one/two/three'

unixify('C:\\//one\\two\\three');
//=> '/one/two/three'

unixify('C:\\//one\\two\\//three');
//=> '/one/two/three'

Other useful libraries for working with paths in node.js:

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Author

Jon Schlinkert

License

Copyright © 2015 Jon Schlinkert Released under the MIT license.


This file was generated by verb-cli on October 04, 2015.

Keywords

FAQs

Last updated on 04 Oct 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc